<? 
	//error_reporting(E_ALL);
	require_once "../../commons/includes/authentication.inc"; 	
	require_once "../../commons/includes/editjs.inc"; 
	require_once "../../commons/includes/stringutils.inc"; 
	require_once "../../commons/includes/connection.inc"; 
	
	$sql = "SELECT * FROM TabCentriProfitto ORDER BY Descrizione";
	$rs = rs($sql, "","Controllo");
	$count=0;
?>

<script src="../../resources/js/layout.js" type="text/javascript"></script>
<script type='text/javascript'>
<!--

					
	var header = sTr( th("colspan='5'","<a style='float:right'  target='fra_right'  class='new' href='add.php'>Aggiungi</a>Centri di profitto ")   ) +		
				 sTr( 
						th("Codice")  + 
						th("Descrizione")  + 
						th("Costo h.")  + 
						th("colspan='2'","&nbsp;")  
					) ;		
				
	pageStart("none");
	listStart(header,"style='width:440px'");
	
-->	
</script>
		
	<script>
	<!--		
	<? while ($values = $rs->getRow()) { 
		$count++;
		foreach($values as $key=>$val) $$key = $val; 
		$CostoOrario = number_format($CostoOrario,2,",",".");	
		?>
		
			tr(
				td("class='edit'","<a target='fra_right' href='edit.php?CentroDiProfitto=<?=$CentroDiProfitto?>'><?=$CentroDiProfitto?></a>") +
				td("<?=$Descrizione?>") +
				td("class='fmtright'","<?=$CostoOrario?>") +
				td("colspan='2'","&nbsp;") 
			);
			
	<?}?>
	
	<? if($count==0){?>
		tr(
			td("colspan='100' class='nobkcolor'","&nbsp;&nbsp;Nessun dato trovato")
		)	
	<?}?>
	
	-->
	</script>
	
	

	<?@$rs->freeResult();?>

<script type='text/javascript'>
<!--
	listEnd();
pageEnd();
-->	
</script>	